﻿#region  文件信息
// ---------------------------------------------------------------------------------------
// <copyright file="ExFilterAttribute.cs" company="">
// 作者：李帅伦
// </copyright>
// <summary>
// 类型简介：
// 类型详细：ExFilterAttribute.cs
// 创建时间：2014-10-30 15:08
// 修改时间：2014-10-30 15:08
// </summary>
// ---------------------------------------------------------------------------------------
#endregion
namespace OneAdmin.Filters
{
    using System;
    using System.Security.Policy;
    using System.Web.Mvc;

    using OneAdmin.Controllers;

    public class ExFilterAttribute : IExceptionFilter
    {
         
        public void OnException(ExceptionContext filterContext)
        {
            Exception exception = filterContext.Exception;
            filterContext.ExceptionHandled = true;
            var controllers = filterContext.Controller.ControllerContext.RouteData.Values["controllers"];
            var action = filterContext.Controller.ControllerContext.RouteData.Values["action"];

           
           

            filterContext.Result =   new ErrorController().Handle(exception);
        }
    }
}